package com.example.houtai.service.impl;

import com.example.houtai.entity.SysUserRole;
import com.example.houtai.mapper.SysUserRoleMapper;
import com.example.houtai.service.ISysUserRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.org.dto.SysUserRoleDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户与角色对应关系 服务实现类
 * </p>
 *
 * @author 龚梦
 * @since 2021-03-22
 */
@Service
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements ISysUserRoleService {

    @Autowired
    private SysUserRoleMapper userRoleMapper;

    @Override
    public void deletebyuserid(Long userId) {
        userRoleMapper.deletebyuserid(userId);
    }

    @Override
    public List<SysUserRoleDto> listbyuserid(Long userId) {
        return userRoleMapper.listbyuserid(userId);
    }
}
